package com.gzhryc.net_marketing.cloud.account.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.jdbc.annotaion.UniqueKey;
import com.gzhryc.net_marketing.cloud.account.dao.enums.CloudPayAccountExpenditureOrderEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * 云支付账号支出订单
 * @version 2022-07-04
 */
@Table(name="cloud_pay_account_expenditure_order")
public class CloudPayAccountExpenditureOrder implements Serializable {

    private static final long serialVersionUID = 1L;

	@Id(auto = false)
    @Column(name = "trade_no", note = "支出订单号")
    protected String tradeNo;

    @Column(name = "business_type", notNull = true, defVal = "GoodsOrderPay", note = "业务类型")
    protected String businessType;

    @UniqueKey
    @Column(name = "business_trade_no", notNull = true, note = "业务订单")
    protected String businessTradeNo;

    @Column(length = 64, note = "支出描述")
    protected String title;

    @Column(name = "account_id", notNull = true, note = "云支付账号ID")
    protected Long accountId;

    @Column(name = "payee_account_id", note = "收款者云支付账号ID")
    protected Long payeeAccountId;

    @Column(name = "notify_url", length = 255, note = "支付者通知路径")
    protected String notifyUrl;

    @Column(name = "payee_notify_url", length = 255, note = "收款者通知路径")
    protected String payeeNotifyUrl;

    @Column(name = "ext_content", length = 1024, note = "支付扩展内容")
    protected String extContent;

    @Column(note = "支出金额")
    protected Integer money;

    @Column(note = "订单状态")
    protected Integer state;

    @Column(name = "pay_date", note = "支付时间")
    protected Date payDate;

    @Column(name = "settlement_date", note = "结算时间")
    protected Date settlementDate;

    @Column(name = "update_date", note = "修改时间", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date", note = "创建时间")
    protected Date createDate;

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getBusinessTradeNo() {
        return businessTradeNo;
    }

    public void setBusinessTradeNo(String businessTradeNo) {
        this.businessTradeNo = businessTradeNo;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public Long getPayeeAccountId() {
        return payeeAccountId;
    }

    public void setPayeeAccountId(Long payeeAccountId) {
        this.payeeAccountId = payeeAccountId;
    }

    public String getPayeeNotifyUrl() {
        return payeeNotifyUrl;
    }

    public void setPayeeNotifyUrl(String payeeNotifyUrl) {
        this.payeeNotifyUrl = payeeNotifyUrl;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getExtContent() {
        return extContent;
    }

    public void setExtContent(String extContent) {
        this.extContent = extContent;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getPayDate() {
        return payDate;
    }

    public void setPayDate(Date payDate) {
        this.payDate = payDate;
    }

    public Date getSettlementDate() {
        return settlementDate;
    }

    public void setSettlementDate(Date settlementDate) {
        this.settlementDate = settlementDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getStateName() {
        return CloudPayAccountExpenditureOrderEnum.State.note(this.state);
    }

    public String getMoneyStr() {
        return NumberTools.getMoneyStr(this.money);
    }
}
